<template>
    <el-container :style="body_style">
        <el-main>
            <el-col
                :md="{ offset: 9, span: 6 }"
                :xs="{ span: 24 }"
                class="login_box"
            >
                <h1>考了个试管理者登录</h1>
                <el-form ref="login_form">
                    <el-form-item label="用户名">
                        <el-input placeholder="请输入用户名" v-model="login_form.userName"></el-input>
                    </el-form-item>
                    <el-form-item label="用户密码">
                        <el-input placeholder="请输入用户密码" v-model="login_form.userPassword"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button
                            type="primary"
                            class="btn_block"
                            @click="login"
                            :loading="login_btn_disable"
                            >登录</el-button
                        >
                    </el-form-item>
                </el-form>
            </el-col>
        </el-main>
    </el-container>
</template>

<script>
// import axios from "axios"

export default {
    name: "login",
    data() {
        return {
            login_btn_disable: false,
            body_style: {
                height: "100%",
                backgroundImage:
                    "url(" + require("@/assets/images/login_bg.jpg") + ")",
                backgroundSize: "auto 100%",
                backgroundPosition: "center",
            },
            login_form: {
                userName:"",
                userPassword:""
            }
        };
    },
    methods: {
        login() {
            // axios.post("")
            this.login_btn_disable = true;
            setTimeout(() => {
                this.login_btn_disable = false;
                this.$router.push("/manager/home");
            }, 2000);
        },
    },
    created() {},
};
</script>

<style scoped>
.login_box {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    margin-top: 15%;
    border-radius: 6px;
}
.btn_block {
    display: block;
    width: 100%;
}
</style>